package com.alm.token.ui.data.bean;

import android.support.annotation.NonNull;

import com.alm.token.utils.DigitUtil;

import java.util.List;

/**
 * Created by en on 2019/4/23.
 */

public class FundArealistResponse {
    /**
     * msg : success
     * status : 0
     * data : [{"id":1,"numbers":86,"countrys":"中国","addtime":1555900509000,"updatetime":1555900509000,"picture":"/static/images/CN.png","yingwen":"China"},{"id":2,"numbers":93,"countrys":"阿富汗","addtime":1555900509000,"updatetime":1555900509000,"picture":"/static/images/AF.png","yingwen":"Afghanistan"},{"id":3,"numbers":355,"countrys":"阿尔巴尼亚","addtime":1555900509000,"updatetime":1555900509000,  "updatetime":1555900509000,"picture":"/static/images/ZW.png","yingwen":"Zimbabwe"}]
     * success : false
     * timestamp : 1556023988755
     * total : null
     */

    private String msg;
    private int status;
    private boolean success;
    private long timestamp;
    private Object total;
    private List<DataBean> data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public Object getTotal() {
        return total;
    }

    public void setTotal(Object total) {
        this.total = total;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Comparable {
        /**
         * id : 1
         * numbers : 86
         * countrys : 中国
         * addtime : 1555900509000
         * updatetime : 1555900509000
         * picture : /static/images/CN.png
         * yingwen : China
         */

        private int id;
        private String numbers;
        private String countrys;
        private long addtime;
        private long updatetime;
        private String picture;
        private String yingwen;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getNumbers() {
            return numbers;
        }

        public void setNumbers(String numbers) {
            this.numbers = numbers;
        }

        public String getCountrys() {
            return countrys;
        }

        public void setCountrys(String countrys) {
            this.countrys = countrys;
        }

        public long getAddtime() {
            return addtime;
        }

        public void setAddtime(long addtime) {
            this.addtime = addtime;
        }

        public long getUpdatetime() {
            return updatetime;
        }

        public void setUpdatetime(long updatetime) {
            this.updatetime = updatetime;
        }

        public String getPicture() {
            return picture;
        }

        public void setPicture(String picture) {
            this.picture = picture;
        }

        public String getYingwen() {
            return yingwen;
        }

        public void setYingwen(String yingwen) {
            this.yingwen = yingwen;
        }

        @Override
        public int compareTo(@NonNull Object o) {
            DataBean dataBean = (DataBean) o;
            return DigitUtil.getPinYinFirst(this.getCountrys()).compareTo(DigitUtil.getPinYinFirst(dataBean.getCountrys()));
        }
    }
}
